nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

HTML/Links and Images

Anchors and img elements: connecting pages together and embedding visuals responsibly.

12 QuestionsBeginnerHigh Priority ~10 min read

The anchor element (a) with an href creates hyperlinks to other pages, in-page fragments (#section-id), email addresses (mailto:) or phone numbers (tel:). The target attribute controls where the link opens, and when you use target="_blank" you should add rel="noopener noreferrer" to prevent the new page from getting access to window.opener. Absolute versus relative URLs, and understanding how paths resolve, is a frequent warm-up question.

Images use the void img element with src and a meaningful alt attribute, which screen readers announce and browsers display if the image fails to load; purely decorative images get an empty alt. Modern pages also use width and height to prevent layout shift, loading="lazy" to defer offscreen images, and srcset with sizes or the picture element to serve responsive images and modern formats like WebP or AVIF. Writing good alt text and avoiding 'click here' as link text are small details that signal real-world experience.

What you'll walk away knowing

How href works with absolute, relative, fragment, mailto and tel links
Why target="_blank" needs rel="noopener noreferrer"
How to write meaningful alt text and when to leave it empty
Responsive and performant images with srcset, picture, loading="lazy" and explicit dimensions
1What does the href attribute in <a> do?Beginner2What is the target="_blank" attribute used for?Intermediate3What is the purpose of the alt attribute in <img>?Beginner
All Topics
1
Basics
Common Tags
Attributes and Elements
Lists
Text tags and Formatting
2
Input and Forms
Block and Inline Elements
Box model
3
Semantic Tags
Links and Images
Media and Embeds
Tables
HTML entities
HTML and CSS
4
Performance
SEO
Progressive Enhancement
5
HTML5
Custom Elements & Web Components
HTML5 APIs
SPAs
6
WCAG
Security
Best Practices
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.